package com.ikaros.emnus;

import lombok.Getter;

/**
 * Created by Ikaros on 2017/9/30.
 */
@Getter
public enum MenuEnum {
    CATALOG(0,"目录"),
    MENU(1,"菜单"),
    BUTTON(2,"按钮");
    private Integer code;
    private String msg;

    MenuEnum(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }
    public static MenuEnum getMenuEnum(int index){
        for (MenuEnum code : MenuEnum.values()) {
            if (code.getCode()==index){
                return  code;
            }
        }
        return null;
    }
}
